package gov.chinatax.ctcps.common.jspTags;

import gov.chinatax.ctcps.formbean.sysform.LoginForm;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

import com.jiuqi.common.Constants;

public class UserInfoDisplay extends TagSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	HttpServletRequest request = null;

	private String params = null;

	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}

	public int doStartTag() throws JspException {
		
		request = (HttpServletRequest)this.pageContext.getRequest();
		
		String[] paramArray = params.split(",");
		
		for(int i =0;i<paramArray.length;i++){
			String p = request.getParameter(paramArray[i]); 
			if(p==null){
				return TagSupport.SKIP_BODY;
			}
		}
		
		return TagSupport.EVAL_BODY_INCLUDE;
		
	}

}
